<%--
  Created by IntelliJ IDEA.
  User: ChengLong Cai
  Date: 2020/1/7
  Time: 14:01
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>${info.hotel_name}</title>
    <link rel="stylesheet" href="/desk/assets/css/style.css">
    <link rel="stylesheet" href="/desk/assets/css/responsive.css">
    <link rel="icon" href="assets/img/favicon.jpg" sizes="32x32">
</head>
<body>
<!-- header -->
<header class="header">
    <div class="header-bottom">
        <nav class="navbar navbar-universal navbar-custom">
            <div class="container">
                <div class="row">
                    <div class="col-lg-3">
                        <div class="logo">
                            <a href="/desk/welcome" class="navbar-brand page-scroll">
                                <img width="143px" height="49px" src="/download/${info.icon}" alt="logo">
                            </a>
                        </div>
                    </div>
                    <div class="col-lg-9">
                        <div class="navbar-header">
                            <button type="button" data-toggle="collapse" data-target=".navbar-main-collapse"
                                    class="navbar-toggle"><span class="sr-only">Toggle navigation</span><span
                                    class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
                            </button>
                        </div>
                        <div class="collapse navbar-collapse navbar-main-collapse">
                            <ul class="nav navbar-nav navbar-right">
                                <ul class="nav navbar-nav navbar-right">
                                    <li><a href="/desk/welcome">主页</a></li>
                                    <li><a href="/desk/reservation">房间预定</a></li>
                                    <li><a href="/desk/about">关于我们</a></li>
                                    <li><a href="javascript:;" style="color: #9CCC65">注册/登录</a></li>
                                </ul>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </nav>
    </div>
</header>
<!-- /header -->
<!-- parallax -->
<section style="height: 664px" class="bg-parallax parallax-window">
    <div class="overlay"></div>
    <div class="container">
        <div class="row">
            <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                <div class="parallax-text">
                    <h2 class="parallax_t __white">${info.hotel_name}</h2>
                    <h2 class="parallax_t __green">${info.hotel_intro_short}</h2>
                    <p>${info.hotel_intro_long}</p>
                </div>
            </div>
            <!-- planner-->
            <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12 planner">
                <div class="planner-block">
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-group">
                                <label style="color:white">手机号</label>
                                <input class="form-control" id="uphone" name="uphone" type="text" placeholder="请输入手机号">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                            <div class="form-group">
                                <label style="color: white">验证码</label>
                                <input class="form-control" id="password" name="password" type="text" width="20%"
                                       placeholder="请输入验证码"/>
                            </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
                            <label>&nbsp;</label>
                            <div class="form-group">
                                <input type="button" class="btn btn-default"
                                       style="padding-top: 5px;margin-bottom: 0px;" value="点击获取验证码">
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-lg-12 col-md-12 col-sm-12">
                            <div class="planner-check-availability">
                                <a href="javascript:void(0)" id="login" class="btn btn-default">登录</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /planner-->
        </div>
    </div>
</section>
<!-- /parallax -->
</body>
</html>
<script type="text/javascript">
    $("#login").click(function () {
        $.ajax({
            url: "/customer/login",
            type: "post",
            data: {"uphone": $("#uphone").val(), "password": $("#password").val()},
            dataType: "text",
            success: function (data) {
                if (data == "true") {
                    location.href = "/desk/welcome";
                } else {
                    alert("账号或密码输入错误");
                }
            }
        })
    })
</script>
